package com.bw.http.utils.zgr

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object HttpHiltModule {

    @HttpClientAnnotation
    @Provides
    @Singleton
    fun provideOkHttpClient():OkHttpClient{
        return OkHttpClientManager.httpClientInstance
    }

    @HttpsClientAnnotation
    @Provides
    @Singleton
    fun provideOkHttpsClient():OkHttpClient{
        return OkHttpClientManager.httpsClientInstance
    }

    @HttpsRetrofit
    @Provides
    @Singleton
    fun provideRetrofit():Retrofit{
        return OkHttpClientManager.retrofitInstance
    }


}